package com.iwhalecloud.citybrain.flow.platform.manager.domain.model;

import com.iwhalecloud.citybrain.flow.platform.manager.domain.repository.FlowObjectProcessInstanceRepository;
import lombok.Data;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.Date;

@Data
@Service
public class ModelFlowObjectProcessInstanceDomain implements Serializable, ApplicationContextAware {

    private static final long serialVersionUID = 2217086034007266771L;

    static FlowObjectProcessInstanceRepository flowObjectProcessInstanceRepository;

    private Long id;

    private String objectInstanceId;

    private String processInstanceId;

    private String taskNodeCode;

    private Date createTime;

    private Date updateTime;


    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        flowObjectProcessInstanceRepository = applicationContext.getBean(FlowObjectProcessInstanceRepository.class);
    }
}
